package com.gdk.ksoft.assembly.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by Mrper on 2015/1/24.
 * 退出应用的消息通知
 */
public class ExitAppReceiver extends BroadcastReceiver {

    public static final String ACTION = ExitAppReceiver.class.getSimpleName();

    public interface OnExitAppListener{
        public void onExitApp();
    }

    private OnExitAppListener listener;

    public ExitAppReceiver(OnExitAppListener listener) {
        this.listener = listener;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if(listener!=null){
            listener.onExitApp();
        }
    }
}
